package extensions.packet;

import extensions.romario.packet.Auth;
import extensions.romario.packet.Packets;
import java.io.IOException;

/**
 *
 * @author Manu
 */
public class AuthInfoPacket extends ClientPacket
{

    private static final String NO_INFO = "No info";

    public AuthInfoPacket(Auth auth)
    {
	this(auth, NO_INFO);
    }
    private Auth _auth;
    private String _message;

    public AuthInfoPacket(Auth auth, String message)
    {
	super(Packets.PACKET_AUTH_INFO);

	_auth = auth;
	_message = message;
    }

    @Override
    public void readContent() throws IOException
    {
    }

    @Override
    protected void writeContent() throws IOException
    {
	writeByte(_auth.getByte());
	writeString(_message);
    }

    @Override
    public void runContent()
    {
    }
}
